home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume15 / touchup / patch1 < prev    next >
Encoding:
Internet Message Format  |  1988-06-30  |  61.6 KB

  1. Subject:  v15i075:  A bitmap editor for suns, Patch1
  2. Newsgroups: comp.sources.unix
  3. Sender: sources
  4. Approved: rsalz@uunet.UU.NET
  5.  
  6. Submitted-by: Raymond T Kreisel <rayk@sbcs.sunysb.edu>
  7. Posting-number: Volume 15, Issue 75
  8. Archive-name: touchup/patch1
  9.  
  10.  Here are the patches that will move Touchup, a bitmap editor for
  11.  Sun workstations, from version 2.2 to version 2.3. The new version
  12.  includes a few new commands, bug fixes and most of the old commands
  13.  now run faster. The patches consist of two shar files. 
  14.  
  15.  
  16.                                         ray
  17.  
  18.  
  19. #! /bin/sh
  20. # This is a shell archive.  Remove anything before this line, then unpack
  21. # it by saving it into a file and typing "sh file".  To overwrite existing
  22. # files, type "sh file -c".  You can also feed this as standard input via
  23. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  24. # will see the following message at the end:
  25. #        "End of archive 1 (of 2)."
  26. # Contents:  DIFFS.1 README_UPDATE
  27. # Wrapped by rayk@sbmiclr on Fri Jun 17 00:31:54 1988
  28. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  29. if test -f DIFFS.1 -a "${1}" != "-c" ; then 
  30.   echo shar: Will not over-write existing file \"DIFFS.1\"
  31. else
  32. echo shar: Extracting \"DIFFS.1\" \(57931 characters\)
  33. sed "s/^X//" >DIFFS.1 <<'END_OF_DIFFS.1'
  34. Xdiff -c ./interface.c ../../Ver2.3/source/interface.c
  35. X*** ./interface.c    Mon Jun 13 23:53:36 1988
  36. X--- ../../Ver2.3/source/interface.c    Fri Jun 17 00:27:22 1988
  37. X***************
  38. X*** 29,65 ****
  39. X          date:    Tue Mar 22 22:04:58 EST 1988
  40. X          author:    rayk
  41. X          changes:add comments
  42. X  **************************************************************************/
  43. X  
  44. X  #include"header.h"
  45. X! 
  46. X! 
  47. X  Cursor fat_cursor;
  48. X  
  49. X- 
  50. X  static short icon_data[] = {
  51. X  #include "touchup.icon"
  52. X  };
  53. X  static mpr_static(touchup_pr, 64, 64, 1, icon_data);
  54. X  
  55. X- static short cursor_data[] = {
  56. X- #include "fat_cursor"
  57. X- };
  58. X- static mpr_static(my_fat_cursor, 16, 16, 1, cursor_data);
  59. X  
  60. X! 
  61. X! 
  62. X!     Frame base_frame,fat_frame,color_frame,command_frame;
  63. X      Canvas canvas,fat_canvas,color_canvas;
  64. X      Pixwin *pw,*fat_pw,*color_pw;
  65. X- static Scrollbar    vertical_sb, horizontal_sb;
  66. X      Panel       panel,fat_panel,color_panel,pattern_panel,
  67. X          brush_panel,region_panel,command_panel;
  68. X!     Panel_item magnify_cycle,grid_cycle,view_cycle;
  69. X      Panel_item  file_panel,brush_choice,mono_cycle,save_cycle,border_cycle,
  70. X          msg_string,color_button,text_panel,current_pattern,
  71. X          load_cycle,pattern_choice,command_choice,region_choice,
  72. X!         compress_cycle,text_size_item,undo_button;
  73. X  
  74. X     struct pixrect *pattern[PATTERN_NO];
  75. X     struct pixrect *brushes[BRUSH_NO];
  76. X--- 29,65 ----
  77. X          date:    Tue Mar 22 22:04:58 EST 1988
  78. X          author:    rayk
  79. X          changes:add comments
  80. X+ 
  81. X+         date:    Fri Apr 15 01:18:05 EDT 1988
  82. X+         author:    rayk
  83. X+         changes:added scroll by line to drawing area
  84. X  **************************************************************************/
  85. X  
  86. X  #include"header.h"
  87. X! extern void yes_no();
  88. X  Cursor fat_cursor;
  89. X  
  90. X  static short icon_data[] = {
  91. X  #include "touchup.icon"
  92. X  };
  93. X  static mpr_static(touchup_pr, 64, 64, 1, icon_data);
  94. X  
  95. X  
  96. X!     Frame base_frame,fat_frame,color_frame;
  97. X!     Frame confirmer;
  98. X      Canvas canvas,fat_canvas,color_canvas;
  99. X      Pixwin *pw,*fat_pw,*color_pw;
  100. X      Panel       panel,fat_panel,color_panel,pattern_panel,
  101. X          brush_panel,region_panel,command_panel;
  102. X!     Panel_item magnify_cycle,grid_cycle,view_cycle,ROP_cycle;
  103. X      Panel_item  file_panel,brush_choice,mono_cycle,save_cycle,border_cycle,
  104. X          msg_string,color_button,text_panel,current_pattern,
  105. X          load_cycle,pattern_choice,command_choice,region_choice,
  106. X!         compress_cycle,text_size_item,undo_button,width_text,
  107. X!         height_text,resize_button,yes_button,no_button,
  108. X!         lasso_remove;
  109. X!    Panel    con_panel;
  110. X!    Panel_item con_msg_string;
  111. X  
  112. X     struct pixrect *pattern[PATTERN_NO];
  113. X     struct pixrect *brushes[BRUSH_NO];
  114. X***************
  115. X*** 68,104 ****
  116. X  /*
  117. X   * Build all of the window that we need for touchup
  118. X   */
  119. X! init_windows(argc,argv) int argc; char *argv[];
  120. X  {
  121. X  
  122. X      base_frame = window_create(NULL,FRAME,
  123. X!         FRAME_ARGS,    argc,argv,
  124. X!         FRAME_LABEL,    "TouchUp version 2.2",
  125. X          FRAME_ICON,        icon_create(ICON_IMAGE, &touchup_pr, 0),
  126. X          FRAME_INHERIT_COLORS,  TRUE,
  127. X          WIN_FONT,    main_font,
  128. X          WIN_WIDTH,    1030,
  129. X!         WIN_HEIGHT,    675+ATTR_ROW(10),
  130. X          WIN_X,        10,
  131. X          WIN_Y,        10,
  132. X          0);
  133. X      panel = window_create(base_frame, PANEL,
  134. X           PANEL_LABEL_BOLD,         TRUE,
  135. X           WIN_FONT,              main_font,
  136. X           WIN_X,             0,
  137. X           WIN_Y,             3,
  138. X!          WIN_HEIGHT,         ATTR_ROW(5),
  139. X          0);
  140. X  
  141. X  
  142. X- 
  143. X-     vertical_sb = scrollbar_create((char*)0);
  144. X-     horizontal_sb = scrollbar_create((char*)0);
  145. X- 
  146. X      canvas = 
  147. X          window_create(base_frame, CANVAS, 
  148. X!         WIN_VERTICAL_SCROLLBAR,    vertical_sb,
  149. X!         WIN_HORIZONTAL_SCROLLBAR,    horizontal_sb,
  150. X          WIN_CONSUME_PICK_EVENTS,    WIN_NO_EVENTS,WIN_MOUSE_BUTTONS,
  151. X                      LOC_DRAG,
  152. X                      LOC_MOVE, 
  153. X--- 68,104 ----
  154. X  /*
  155. X   * Build all of the window that we need for touchup
  156. X   */
  157. X! init_windows(argcp,argvp) int *argcp; char **argvp;
  158. X  {
  159. X  
  160. X      base_frame = window_create(NULL,FRAME,
  161. X!         FRAME_LABEL,    "TouchUp version 2.3",
  162. X          FRAME_ICON,        icon_create(ICON_IMAGE, &touchup_pr, 0),
  163. X+         FRAME_ARGC_PTR_ARGV,    argcp,argvp,
  164. X          FRAME_INHERIT_COLORS,  TRUE,
  165. X          WIN_FONT,    main_font,
  166. X          WIN_WIDTH,    1030,
  167. X!         WIN_HEIGHT,    675+ATTR_ROW(11),
  168. X          WIN_X,        10,
  169. X          WIN_Y,        10,
  170. X          0);
  171. X+ 
  172. X      panel = window_create(base_frame, PANEL,
  173. X+ /*         WIN_VERTICAL_SCROLLBAR,     scrollbar_create(SCROLL_LINE_HEIGHT,20,0), */
  174. X           PANEL_LABEL_BOLD,         TRUE,
  175. X           WIN_FONT,              main_font,
  176. X           WIN_X,             0,
  177. X           WIN_Y,             3,
  178. X! /*         PANEL_PAINT,         PANEL_NO_CLEAR, */
  179. X!          WIN_HEIGHT,         ATTR_ROW(6),
  180. X!           PANEL_HEIGHT,         ATTR_ROW(11),
  181. X          0);
  182. X  
  183. X  
  184. X      canvas = 
  185. X          window_create(base_frame, CANVAS, 
  186. X!         WIN_VERTICAL_SCROLLBAR,    scrollbar_create(SCROLL_LINE_HEIGHT,20,0),
  187. X!         WIN_HORIZONTAL_SCROLLBAR,    scrollbar_create(SCROLL_LINE_HEIGHT,20,0),
  188. X          WIN_CONSUME_PICK_EVENTS,    WIN_NO_EVENTS,WIN_MOUSE_BUTTONS,
  189. X                      LOC_DRAG,
  190. X                      LOC_MOVE, 
  191. X***************
  192. X*** 107,117 ****
  193. X          WIN_WIDTH,            780,
  194. X  /*        WIN_HEIGHT,             650, */
  195. X          WIN_X,            PATTERN_SIZE*2+70,
  196. X!         WIN_Y,            ATTR_ROW(7)+12,
  197. X          CANVAS_AUTO_SHRINK,        FALSE,
  198. X          CANVAS_AUTO_EXPAND,        FALSE,
  199. X          CANVAS_FIXED_IMAGE,        FALSE,
  200. X!         CANVAS_RETAINED,        TRUE,
  201. X          CANVAS_WIDTH,        image_wid,
  202. X          CANVAS_HEIGHT,        image_hgt,
  203. X          WIN_BELOW,            panel,
  204. X--- 107,117 ----
  205. X          WIN_WIDTH,            780,
  206. X  /*        WIN_HEIGHT,             650, */
  207. X          WIN_X,            PATTERN_SIZE*2+70,
  208. X!         WIN_Y,            ATTR_ROW(8)+12,
  209. X          CANVAS_AUTO_SHRINK,        FALSE,
  210. X          CANVAS_AUTO_EXPAND,        FALSE,
  211. X          CANVAS_FIXED_IMAGE,        FALSE,
  212. X!         CANVAS_RETAINED,        FALSE,
  213. X          CANVAS_WIDTH,        image_wid,
  214. X          CANVAS_HEIGHT,        image_hgt,
  215. X          WIN_BELOW,            panel,
  216. X***************
  217. X*** 124,131 ****
  218. X      command_panel = window_create(base_frame, PANEL,
  219. X           WIN_FONT,            main_font,
  220. X  /*         WIN_X,             1000-(COMMAND_SIZE*2+32), */
  221. X!          WIN_Y,             ATTR_ROW(6)+12,
  222. X           WIN_WIDTH,             COMMAND_SIZE*2+5,
  223. X           WIN_HEIGHT,         COMMAND_SIZE*COMMAND_NO/2+9,
  224. X           WIN_RIGHT_OF,         canvas,
  225. X           WIN_BELOW,             panel,
  226. X--- 124,132 ----
  227. X      command_panel = window_create(base_frame, PANEL,
  228. X           WIN_FONT,            main_font,
  229. X  /*         WIN_X,             1000-(COMMAND_SIZE*2+32), */
  230. X!          WIN_Y,             ATTR_ROW(7)+12,
  231. X           WIN_WIDTH,             COMMAND_SIZE*2+5,
  232. X+ 
  233. X           WIN_HEIGHT,         COMMAND_SIZE*COMMAND_NO/2+9,
  234. X           WIN_RIGHT_OF,         canvas,
  235. X           WIN_BELOW,             panel,
  236. X***************
  237. X*** 171,177 ****
  238. X           WIN_FONT,            main_font,
  239. X           WIN_SHOW,            TRUE,
  240. X           WIN_X,             1000-(COMMAND_SIZE*2+32),
  241. X!          WIN_Y,             COMMAND_SIZE*COMMAND_NO/2+9+ATTR_ROW(6)+14,
  242. X           WIN_WIDTH,             COMMAND_SIZE*2+5,
  243. X  /*         WIN_HEIGHT,         COMMAND_SIZE*4+15, */
  244. X           WIN_BELOW,             command_panel,
  245. X--- 172,178 ----
  246. X           WIN_FONT,            main_font,
  247. X           WIN_SHOW,            TRUE,
  248. X           WIN_X,             1000-(COMMAND_SIZE*2+32),
  249. X!          WIN_Y,             COMMAND_SIZE*COMMAND_NO/2+9+ATTR_ROW(7)+14,
  250. X           WIN_WIDTH,             COMMAND_SIZE*2+5,
  251. X  /*         WIN_HEIGHT,         COMMAND_SIZE*4+15, */
  252. X           WIN_BELOW,             command_panel,
  253. X***************
  254. X*** 223,229 ****
  255. X           WIN_FONT,            main_font,
  256. X           WIN_SHOW,            FALSE,
  257. X           WIN_X,             1000-(COMMAND_SIZE*2+32),
  258. X!          WIN_Y,             COMMAND_SIZE*COMMAND_NO/2+9+ATTR_ROW(6)+14,
  259. X           WIN_WIDTH,             COMMAND_SIZE*2+5,
  260. X  /*         WIN_HEIGHT,         COMMAND_SIZE*4+4, */
  261. X           WIN_BELOW,             command_panel,
  262. X--- 224,230 ----
  263. X           WIN_FONT,            main_font,
  264. X           WIN_SHOW,            FALSE,
  265. X           WIN_X,             1000-(COMMAND_SIZE*2+32),
  266. X!          WIN_Y,             COMMAND_SIZE*COMMAND_NO/2+9+ATTR_ROW(7)+14,
  267. X           WIN_WIDTH,             COMMAND_SIZE*2+5,
  268. X  /*         WIN_HEIGHT,         COMMAND_SIZE*4+4, */
  269. X           WIN_BELOW,             command_panel,
  270. X***************
  271. X*** 234,240 ****
  272. X           PANEL_LABEL_BOLD,         TRUE,
  273. X           PANEL_SHOW_MENU,         FALSE,
  274. X           PANEL_LAYOUT,        PANEL_VERTICAL,
  275. X!          PANEL_VALUE,         5,
  276. X           PANEL_LABEL_X,        10,
  277. X           PANEL_LABEL_Y,        4,
  278. X           PANEL_DISPLAY_LEVEL,    PANEL_ALL,
  279. X--- 235,241 ----
  280. X           PANEL_LABEL_BOLD,         TRUE,
  281. X           PANEL_SHOW_MENU,         FALSE,
  282. X           PANEL_LAYOUT,        PANEL_VERTICAL,
  283. X!          PANEL_VALUE,         PASTE,
  284. X           PANEL_LABEL_X,        10,
  285. X           PANEL_LABEL_Y,        4,
  286. X           PANEL_DISPLAY_LEVEL,    PANEL_ALL,
  287. X***************
  288. X*** 241,250 ****
  289. X           PANEL_FEEDBACK,        PANEL_INVERTED,
  290. X           PANEL_CHOICE_IMAGES,    ®_command2_pr,®_command3_pr,
  291. X                      ®_command4_pr,®_command7_pr,
  292. X!                     ®_command5_pr,®_command6_pr,
  293. X                      ®_command8_pr,®_command1_pr,
  294. X                      0,
  295. X!          PANEL_CHOICE_XS,        1,51,1,51,1,51,1,51,
  296. X                      0,
  297. X           
  298. X           PANEL_CHOICE_YS,        1,1,
  299. X--- 242,252 ----
  300. X           PANEL_FEEDBACK,        PANEL_INVERTED,
  301. X           PANEL_CHOICE_IMAGES,    ®_command2_pr,®_command3_pr,
  302. X                      ®_command4_pr,®_command7_pr,
  303. X!                     ®_command5_pr,®_command9_pr,
  304. X                      ®_command8_pr,®_command1_pr,
  305. X+                     ®_command6_pr,
  306. X                      0,
  307. X!          PANEL_CHOICE_XS,        1,51,1,51,1,51,1,51,51,
  308. X                      0,
  309. X           
  310. X           PANEL_CHOICE_YS,        1,1,
  311. X***************
  312. X*** 251,256 ****
  313. X--- 253,259 ----
  314. X                      50,50,
  315. X                      99,99,
  316. X                      148,148,
  317. X+                     197,
  318. X                      0,
  319. X           PANEL_NOTIFY_PROC,     region_handle,
  320. X           0);
  321. X***************
  322. X*** 259,265 ****
  323. X      pattern_panel = window_create(base_frame, PANEL,
  324. X           WIN_FONT,            main_font,
  325. X           WIN_X,             0,
  326. X!          WIN_Y,            ATTR_ROW(6)+12,
  327. X            WIN_BELOW,            panel,
  328. X           WIN_WIDTH,             PATTERN_SIZE*2+65,
  329. X  /*         WIN_HEIGHT,         PATTERN_SIZE*PATTERN_NO/2+22, */
  330. X--- 262,268 ----
  331. X      pattern_panel = window_create(base_frame, PANEL,
  332. X           WIN_FONT,            main_font,
  333. X           WIN_X,             0,
  334. X!          WIN_Y,            ATTR_ROW(7)+12,
  335. X            WIN_BELOW,            panel,
  336. X           WIN_WIDTH,             PATTERN_SIZE*2+65,
  337. X  /*         WIN_HEIGHT,         PATTERN_SIZE*PATTERN_NO/2+22, */
  338. X***************
  339. X*** 363,371 ****
  340. X       PANEL_LABEL_IMAGE, &pattern1_pr,
  341. X       0);
  342. X  
  343. X!     color_frame = window_create(base_frame,FRAME,
  344. X          FRAME_LABEL,    "Color Pallet",
  345. X              FRAME_SHOW_LABEL, TRUE,
  346. X          WIN_FONT,    main_font,
  347. X          WIN_WIDTH,    PALET_BLOCK*16+9,
  348. X          WIN_HEIGHT,    PALET_BLOCK*(16+3)+20+ATTR_ROW(2),
  349. X--- 366,378 ----
  350. X       PANEL_LABEL_IMAGE, &pattern1_pr,
  351. X       0);
  352. X  
  353. X!   image_depth = pw->pw_pixrect->pr_depth;
  354. X!   if (image_depth > 1)
  355. X!     {
  356. X!          color_frame = window_create(base_frame,FRAME,
  357. X          FRAME_LABEL,    "Color Pallet",
  358. X              FRAME_SHOW_LABEL, TRUE,
  359. X+         FRAME_INHERIT_COLORS,  TRUE,
  360. X          WIN_FONT,    main_font,
  361. X          WIN_WIDTH,    PALET_BLOCK*16+9,
  362. X          WIN_HEIGHT,    PALET_BLOCK*(16+3)+20+ATTR_ROW(2),
  363. X***************
  364. X*** 373,383 ****
  365. X          WIN_Y,        10,
  366. X          0);
  367. X  
  368. X!     color_canvas = 
  369. X!         window_create(color_frame, CANVAS, 
  370. X!         WIN_CONSUME_PICK_EVENTS,    WIN_NO_EVENTS, WIN_MOUSE_BUTTONS,
  371. X!                     LOC_DRAG,
  372. X!                     LOC_MOVE, 
  373. X                      0,
  374. X          WIN_EVENT_PROC,         color_handle_event,
  375. X          WIN_X,        0,
  376. X--- 380,388 ----
  377. X          WIN_Y,        10,
  378. X          0);
  379. X  
  380. X!           color_canvas = 
  381. X!             window_create(color_frame, CANVAS, 
  382. X!         WIN_CONSUME_PICK_EVENTS,     WIN_NO_EVENTS,WIN_MOUSE_BUTTONS,
  383. X                      0,
  384. X          WIN_EVENT_PROC,         color_handle_event,
  385. X          WIN_X,        0,
  386. X***************
  387. X*** 391,399 ****
  388. X          CANVAS_RESIZE_PROC,        draw_colormap,
  389. X          0),
  390. X  
  391. X!     color_pw = canvas_pixwin(color_canvas);
  392. X  
  393. X!     color_panel = window_create(color_frame, PANEL,
  394. X           PANEL_LABEL_BOLD,         TRUE,
  395. X          WIN_FONT,    main_font,
  396. X           WIN_X,             0,
  397. X--- 396,404 ----
  398. X          CANVAS_RESIZE_PROC,        draw_colormap,
  399. X          0),
  400. X  
  401. X!         color_pw = canvas_pixwin(color_canvas);
  402. X  
  403. X!         color_panel = window_create(color_frame, PANEL,
  404. X           PANEL_LABEL_BOLD,         TRUE,
  405. X          WIN_FONT,    main_font,
  406. X           WIN_X,             0,
  407. X***************
  408. X*** 403,422 ****
  409. X          0);
  410. X  
  411. X  
  412. X!    (void)panel_create_item(color_panel, PANEL_BUTTON, 
  413. X!      PANEL_ITEM_X, ATTR_COL(0),
  414. X!      PANEL_ITEM_Y, ATTR_ROW(0),
  415. X!      PANEL_LABEL_IMAGE, panel_button_image(color_panel, "done", 5, (Pixfont *)0),
  416. X!      PANEL_NOTIFY_PROC, color_done,
  417. X!      0);
  418. X  
  419. X  
  420. X- 
  421. X     
  422. X      fat_frame = window_create(base_frame,FRAME,
  423. X          FRAME_LABEL,    "Big bits",
  424. X              FRAME_SHOW_LABEL, TRUE,
  425. X!         WIN_CURSOR,    cursor_create(CURSOR_IMAGE, &my_fat_cursor,0),
  426. X          WIN_FONT,    main_font,
  427. X          WIN_WIDTH,    ATTR_COL(31),
  428. X          WIN_HEIGHT,    ATTR_ROW(24),
  429. X--- 408,427 ----
  430. X          0);
  431. X  
  432. X  
  433. X!        (void)panel_create_item(color_panel, PANEL_BUTTON, 
  434. X!          PANEL_ITEM_X, ATTR_COL(0),
  435. X!          PANEL_ITEM_Y, ATTR_ROW(0),
  436. X!          PANEL_LABEL_IMAGE, panel_button_image(color_panel, "done", 5, (Pixfont *)0),
  437. X!          PANEL_NOTIFY_PROC, color_done,
  438. X!          0);
  439. X!     }
  440. X  
  441. X  
  442. X     
  443. X      fat_frame = window_create(base_frame,FRAME,
  444. X          FRAME_LABEL,    "Big bits",
  445. X              FRAME_SHOW_LABEL, TRUE,
  446. X!         FRAME_INHERIT_COLORS,  TRUE,
  447. X          WIN_FONT,    main_font,
  448. X          WIN_WIDTH,    ATTR_COL(31),
  449. X          WIN_HEIGHT,    ATTR_ROW(24),
  450. X***************
  451. X*** 430,436 ****
  452. X                      LOC_DRAG,
  453. X                      LOC_MOVE, 
  454. X                      0,
  455. X-         WIN_CURSOR,            cursor_create(CURSOR_IMAGE, &my_fat_cursor,0),
  456. X          WIN_EVENT_PROC,         fat_handle_event,
  457. X          WIN_X,        0,
  458. X          WIN_Y,        ATTR_ROW(2)+5,
  459. X--- 435,440 ----
  460. X***************
  461. X*** 527,533 ****
  462. X          PANEL_ITEM_X, ATTR_COL(53),
  463. X          PANEL_ITEM_Y, ATTR_ROW(1),
  464. X          PANEL_LABEL_STRING, "Save:",
  465. X!         PANEL_CHOICE_STRINGS, "Standard format","Compressed",0,
  466. X          PANEL_VALUE, 0,
  467. X          0);
  468. X  
  469. X--- 531,537 ----
  470. X          PANEL_ITEM_X, ATTR_COL(53),
  471. X          PANEL_ITEM_Y, ATTR_ROW(1),
  472. X          PANEL_LABEL_STRING, "Save:",
  473. X!         PANEL_CHOICE_STRINGS, "Standard format","Byte_Encoded",0,
  474. X          PANEL_VALUE, 0,
  475. X          0);
  476. X  
  477. X***************
  478. X*** 545,550 ****
  479. X--- 549,564 ----
  480. X       PANEL_NOTIFY_PROC, undo_screen,
  481. X       0);
  482. X  
  483. X+     ROP_cycle =
  484. X+     panel_create_item(panel, PANEL_CYCLE,
  485. X+         PANEL_ITEM_X, ATTR_COL(0),
  486. X+         PANEL_ITEM_Y, ATTR_ROW(3),
  487. X+         PANEL_LABEL_STRING, "Bitmap OP:",
  488. X+         PANEL_CHOICE_STRINGS, "default","XOR","AND","OR","SRC",0,
  489. X+         PANEL_VALUE, grid_size,
  490. X+         PANEL_NOTIFY_PROC, change_parms,
  491. X+         0);
  492. X+ 
  493. X      grid_cycle =
  494. X      panel_create_item(panel, PANEL_CYCLE,
  495. X          PANEL_ITEM_X, ATTR_COL(8),
  496. X***************
  497. X*** 571,581 ****
  498. X       PANEL_VALUE_DISPLAY_LENGTH, 35,
  499. X       PANEL_LABEL_STRING, "Filename:",
  500. X       PANEL_NOTIFY_PROC, make_new_name,
  501. X!      PANEL_NOTIFY_STRING, "\033",
  502. X       PANEL_VALUE_STORED_LENGTH, MAX_FILE_NAME,
  503. X       PANEL_SHOW_MENU, FALSE,
  504. X       0);
  505. X  
  506. X     text_panel=panel_create_item(panel, PANEL_TEXT, 
  507. X       PANEL_ITEM_X, ATTR_COL(80),
  508. X       PANEL_ITEM_Y, ATTR_ROW(1),
  509. X--- 585,604 ----
  510. X       PANEL_VALUE_DISPLAY_LENGTH, 35,
  511. X       PANEL_LABEL_STRING, "Filename:",
  512. X       PANEL_NOTIFY_PROC, make_new_name,
  513. X!      PANEL_NOTIFY_STRING, "\033\r",
  514. X       PANEL_VALUE_STORED_LENGTH, MAX_FILE_NAME,
  515. X       PANEL_SHOW_MENU, FALSE,
  516. X       0);
  517. X  
  518. X+    lasso_remove=panel_create_item(panel, PANEL_TOGGLE, 
  519. X+      PANEL_ITEM_X, ATTR_COL(111),
  520. X+      PANEL_ITEM_Y, ATTR_ROW(2),
  521. X+      PANEL_SHOW_MENU, FALSE,
  522. X+      PANEL_LABEL_STRING, "lasso clear:",
  523. X+      PANEL_CHOICE_STRINGS, "",0,
  524. X+      PANEL_TOGGLE_VALUE, 0, TRUE,
  525. X+      0);
  526. X+ 
  527. X     text_panel=panel_create_item(panel, PANEL_TEXT, 
  528. X       PANEL_ITEM_X, ATTR_COL(80),
  529. X       PANEL_ITEM_Y, ATTR_ROW(1),
  530. X***************
  531. X*** 584,589 ****
  532. X--- 607,614 ----
  533. X       PANEL_LABEL_STRING, "Text string:",
  534. X       PANEL_VALUE_STORED_LENGTH, MAX_FILE_NAME,
  535. X       PANEL_SHOW_MENU, FALSE,
  536. X+      PANEL_NOTIFY_PROC, make_new_name,
  537. X+      PANEL_NOTIFY_STRING, "\r",
  538. X       0);
  539. X  
  540. X  
  541. X***************
  542. X*** 656,666 ****
  543. X  
  544. X     msg_string = panel_create_item(panel, PANEL_MESSAGE, 
  545. X       PANEL_ITEM_X, ATTR_COL(0),
  546. X!      PANEL_ITEM_Y, ATTR_ROW(4),
  547. X       PANEL_LABEL_BOLD,    TRUE,
  548. X       PANEL_LABEL_STRING, "",
  549. X       0);
  550. X  
  551. X    fat_cursor = window_get(canvas,WIN_CURSOR);
  552. X    cursor_set(fat_cursor,CURSOR_OP,PIX_SRC^PIX_DST,0);
  553. X    window_set(canvas,WIN_CURSOR,fat_cursor,0);
  554. X--- 681,761 ----
  555. X  
  556. X     msg_string = panel_create_item(panel, PANEL_MESSAGE, 
  557. X       PANEL_ITEM_X, ATTR_COL(0),
  558. X!      PANEL_ITEM_Y, ATTR_ROW(5),
  559. X       PANEL_LABEL_BOLD,    TRUE,
  560. X       PANEL_LABEL_STRING, "",
  561. X       0);
  562. X  
  563. X+ 
  564. X+ /*
  565. X+  * Confirmer window
  566. X+  */
  567. X+    confirmer = window_create(base_frame, FRAME, 
  568. X+                 WIN_WIDTH,      300,
  569. X+                 WIN_HEIGHT,     150,
  570. X+         WIN_SHOW,    FALSE,
  571. X+         WIN_X,        1152/2 - 390/2,
  572. X+         WIN_Y,        900/2 - 140/2,
  573. X+                 FRAME_SHOW_LABEL, FALSE,
  574. X+                                   0);
  575. X+ 
  576. X+    con_panel = window_create(confirmer, PANEL,
  577. X+                 WIN_WIDTH,      390,
  578. X+                 WIN_HEIGHT,     60,
  579. X+                                  0);
  580. X+ 
  581. X+    con_msg_string = panel_create_item(con_panel, PANEL_MESSAGE,
  582. X+           PANEL_ITEM_X, 0,
  583. X+           PANEL_ITEM_Y, 10,
  584. X+                   PANEL_LABEL_STRING, "",
  585. X+                                         0);
  586. X+ 
  587. X+    panel_create_item(con_panel, PANEL_BUTTON,
  588. X+                   PANEL_ITEM_X, 130,
  589. X+                   PANEL_ITEM_Y, 35,
  590. X+                   PANEL_LABEL_IMAGE, panel_button_image(con_panel,"NO",3,0),
  591. X+                   PANEL_CLIENT_DATA, FALSE,
  592. X+                   PANEL_NOTIFY_PROC, yes_no,
  593. X+                   0);
  594. X+ 
  595. X+    panel_create_item(con_panel, PANEL_BUTTON,
  596. X+                   PANEL_ITEM_X, 205,
  597. X+                   PANEL_ITEM_Y, 35,
  598. X+                   PANEL_LABEL_IMAGE, panel_button_image(con_panel, "YES", 3, 0),
  599. X+                   PANEL_CLIENT_DATA, TRUE,
  600. X+                   PANEL_NOTIFY_PROC, yes_no,
  601. X+                   0);
  602. X+ 
  603. X+    window_fit(confirmer);
  604. X+ 
  605. X+    
  606. X+    resize_button = panel_create_item(panel, PANEL_BUTTON, 
  607. X+      PANEL_ITEM_X, ATTR_COL(30),
  608. X+      PANEL_ITEM_Y, ATTR_ROW(3),
  609. X+      PANEL_LABEL_IMAGE, panel_button_image(panel, "resize", 5, (Pixfont *)0),
  610. X+      PANEL_NOTIFY_PROC, resize_canvas,
  611. X+      0);
  612. X+ 
  613. X+    width_text=panel_create_item(panel, PANEL_TEXT, 
  614. X+      PANEL_ITEM_X, ATTR_COL(39),
  615. X+      PANEL_ITEM_Y, ATTR_ROW(3),
  616. X+      PANEL_VALUE, "1152",
  617. X+      PANEL_VALUE_DISPLAY_LENGTH, 6,
  618. X+      PANEL_LABEL_STRING, "Width:",
  619. X+      PANEL_VALUE_STORED_LENGTH, 6,
  620. X+      PANEL_SHOW_MENU, FALSE,
  621. X+      0);
  622. X+ 
  623. X+    height_text=panel_create_item(panel, PANEL_TEXT, 
  624. X+      PANEL_ITEM_X, ATTR_COL(53),
  625. X+      PANEL_ITEM_Y, ATTR_ROW(3),
  626. X+      PANEL_VALUE, "900",
  627. X+      PANEL_VALUE_DISPLAY_LENGTH, 6,
  628. X+      PANEL_LABEL_STRING, "Heigth:",
  629. X+      PANEL_VALUE_STORED_LENGTH, 6,
  630. X+      PANEL_SHOW_MENU, FALSE,
  631. X+      0);
  632. X+ 
  633. X    fat_cursor = window_get(canvas,WIN_CURSOR);
  634. X    cursor_set(fat_cursor,CURSOR_OP,PIX_SRC^PIX_DST,0);
  635. X    window_set(canvas,WIN_CURSOR,fat_cursor,0);
  636. X***************
  637. X*** 670,673 ****
  638. X--- 765,772 ----
  639. X    window_set(fat_canvas,WIN_CURSOR,fat_cursor,0);
  640. X  
  641. X  }
  642. X+ 
  643. X+ 
  644. X+ 
  645. X+ 
  646. X  
  647. Xdiff -c ./oval.c ../../Ver2.3/source/oval.c
  648. X*** ./oval.c    Mon Jun 13 23:53:38 1988
  649. X--- ../../Ver2.3/source/oval.c    Fri Jun 17 00:27:22 1988
  650. X***************
  651. X*** 37,47 ****
  652. X  /*
  653. X   * draw an oval by making the sides by vectors and ends by semicircles
  654. X   */
  655. X!      draw_oval(pw, center_x,center_y, curr_pos_x,curr_pos_y,flag)
  656. X  
  657. X         Pixwin            *pw;
  658. X         int         center_x,center_y,curr_pos_x,curr_pos_y;
  659. X!        int                flag;
  660. X     
  661. X       {    
  662. X         struct  pr_pos     center,
  663. X--- 37,47 ----
  664. X  /*
  665. X   * draw an oval by making the sides by vectors and ends by semicircles
  666. X   */
  667. X!      draw_oval(pw, center_x,center_y, curr_pos_x,curr_pos_y,ROP,flag)
  668. X  
  669. X         Pixwin            *pw;
  670. X         int         center_x,center_y,curr_pos_x,curr_pos_y;
  671. X!        int                flag,ROP;
  672. X     
  673. X       {    
  674. X         struct  pr_pos     center,
  675. X***************
  676. X*** 49,66 ****
  677. X          int             x, y, radius,
  678. X              error, npts,
  679. X                  h_width, h_height,
  680. X!             x_off, y_off,ROP;
  681. X  
  682. X-     if (flag)
  683. X-      {
  684. X-       if (image_depth > 1)
  685. X-           ROP = PIX_SRC;
  686. X-       else
  687. X-         ROP = PIX_SET;
  688. X-      }
  689. X-         else
  690. X-        ROP = PIX_XOR;
  691. X- 
  692. X      center.x = center_x;
  693. X      center.y = center_y;
  694. X      curr_pos.x = curr_pos_x;
  695. X--- 49,56 ----
  696. X          int             x, y, radius,
  697. X              error, npts,
  698. X                  h_width, h_height,
  699. X!             x_off, y_off;
  700. X  
  701. X      center.x = center_x;
  702. X      center.y = center_y;
  703. X      curr_pos.x = curr_pos_x;
  704. X***************
  705. X*** 119,124 ****
  706. X             ptlist[npts].x=center.x-(x+x_off); ptlist[npts++].y=center.y-(y+y_off);
  707. X            }
  708. X            if (flag)
  709. X!         my_pw_polypoint(pw,0,0,npts,ptlist,ROP);
  710. X  }  /* end of function draw_oval() */
  711. X  
  712. X--- 109,114 ----
  713. X             ptlist[npts].x=center.x-(x+x_off); ptlist[npts++].y=center.y-(y+y_off);
  714. X            }
  715. X            if (flag)
  716. X!         my_pw_polypoint(0,0,npts,ptlist,ROP);
  717. X  }  /* end of function draw_oval() */
  718. X  
  719. XOnly in ../../Ver2.3/source: scale.cicon
  720. Xdiff -c ./touchup.c ../../Ver2.3/source/touchup.c
  721. X*** ./touchup.c    Mon Jun 13 23:53:42 1988
  722. X--- ../../Ver2.3/source/touchup.c    Fri Jun 17 00:27:28 1988
  723. X***************
  724. X*** 1,4 ****
  725. X--- 1,5 ----
  726. X  
  727. X+ 
  728. X  /**************************************************************************
  729. X     Touchup a bitmap graphics editor for the Sun Workstation running SunView
  730. X     Copyright (c) 1988 by Raymond Kreisel
  731. X***************
  732. X*** 30,35 ****
  733. X--- 31,73 ----
  734. X          date:    Tue Mar 22 22:04:58 EST 1988
  735. X          author:    rayk
  736. X          changes:add comments
  737. X+ 
  738. X+         date:    Fri Apr 15 00:33:52 EDT 1988
  739. X+         author:    rayk
  740. X+         changes:added user definable ROPs and default ROPs
  741. X+ 
  742. X+         date:    Tue Apr 19 21:45:52 EDT 1988
  743. X+         author:    rayk
  744. X+         changes:added LOC_TRAJECTORY for paint command so that
  745. X+             it does not skip that much when you move the cursor
  746. X+             quickly
  747. X+ 
  748. X+         date:    Thu Apr 21 20:14:58 EDT 1988
  749. X+         author:    rayk
  750. X+         changes:change the interface to text, so that you can
  751. X+             drag the text
  752. X+ 
  753. X+         date:    Thu Apr 25 3:02:23  EDT 1988
  754. X+         author:    rainbow
  755. X+         changes:made "undo" so that it toggle between buffers
  756. X+ 
  757. X+         date:    Mon May  2 22:18:11 EDT 1988
  758. X+         author:    rayk
  759. X+         changes:corrected a bug of not setting the correct
  760. X+             colormap fields on boot up, bug noted by:
  761. X+                mcgill-vision!amadeus!gamin
  762. X+ 
  763. X+         date:    Fri Jun  3 22:13:11 EDT 1988
  764. X+         author:    rayk
  765. X+         changes:corrected a bug of returning the pointer
  766. X+             to a pixrect in my_mem_create, bug noted by:
  767. X+                weiser.pa@Xerox.com
  768. X+             
  769. X+         date:    Wed Jun 15 22:04:25 EDT 1988
  770. X+         author:    juang@aloft.att.com
  771. X+         changes:fixed SunView command line arguments that
  772. X+             are passsed to the base frame
  773. X+ 
  774. X  **************************************************************************/
  775. X  
  776. X  #include "header.h"
  777. X***************
  778. X*** 43,48 ****
  779. X--- 81,87 ----
  780. X  int select_pt_x=0-1,select_pt_y=0-1;
  781. X  int old_x=0; old_y=0;
  782. X  int start_x=0; start_y=0;
  783. X+ int paint_first=TRUE;
  784. X  char file_name[MAX_FILE_NAME];
  785. X  struct pixrect *cut_buffer_pr=NULL,
  786. X          *undo_pr=NULL;
  787. X***************
  788. X*** 49,55 ****
  789. X--- 88,145 ----
  790. X  
  791. X  struct pixfont *main_font=NULL;
  792. X  
  793. X+ 
  794. X  /*
  795. X+  * this event proc will resize the canvas the size given in
  796. X+  * width_text and height_text, in the EXPERT command panel
  797. X+  */
  798. X+ resize_canvas()
  799. X+ {
  800. X+ int width, height;
  801. X+ 
  802. X+   width = atoi((char*)panel_get_value(width_text));
  803. X+   height = atoi((char*)panel_get_value(height_text));
  804. X+ 
  805. X+   if ((width > 0) &&
  806. X+      (height > 0) &&
  807. X+      (width < 10000) &&
  808. X+      (height < 10000))
  809. X+   {
  810. X+     image_wid = width;
  811. X+     image_hgt = height;
  812. X+         (void)window_set(canvas,
  813. X+           CANVAS_WIDTH,        image_wid,
  814. X+             CANVAS_HEIGHT,        image_hgt,
  815. X+             0);
  816. X+     if (undo_flag)
  817. X+       {
  818. X+          MY_pr_destroy(undo_pr);
  819. X+          undo_pr = my_mem_create(image_wid,image_hgt,image_depth);
  820. X+       }
  821. X+   }
  822. X+   else
  823. X+      ERROR("Bad canvas size, either too small or too large");
  824. X+ }
  825. X+ 
  826. X+ 
  827. X+ /*
  828. X+  * Get_ROP: this function will get the check user specified bitmap OP
  829. X+  * sot that we know how to paint the new objects on to the bitmap
  830. X+  */
  831. X+ int get_current_ROP()
  832. X+ {
  833. X+   switch((int)panel_get_value(ROP_cycle)) {
  834. X+      case 0 : return(0);
  835. X+      case 1 : return(PIX_XOR);
  836. X+      case 2 : return(PIX_SRC & PIX_DST);
  837. X+      case 3 : return(PIX_SRC | PIX_DST);
  838. X+      case 4 : return(PIX_SRC);
  839. X+   }
  840. X+ }
  841. X+ 
  842. X+ 
  843. X+ 
  844. X+ /*
  845. X   * this is the event handler for the special cut/paste command menu
  846. X   */
  847. X  region_handle(item, event)
  848. X***************
  849. X*** 83,88 ****
  850. X--- 173,181 ----
  851. X      case MOVE:
  852. X          print_msg("Hold down the RIGHT mouse button and drag the object.");
  853. X              break;
  854. X+     case SCALE:
  855. X+         scale_region();
  856. X+                         break;
  857. X      }
  858. X  
  859. X  }
  860. X***************
  861. X*** 96,110 ****
  862. X  Event           *event;
  863. X  {
  864. X    hide_msg();
  865. X    if ((int)panel_get_value(command_choice) != GET_PT)
  866. X      {
  867. X        (void)window_set(region_panel, WIN_SHOW, FALSE, 0);
  868. X!       panel_set(region_choice,PANEL_VALUE,5,0);
  869. X      }
  870. X    (void)window_set(brush_panel, WIN_SHOW, FALSE, 0);
  871. X      switch((int)panel_get_value(command_choice)) {
  872. X      case TEXT:
  873. X!           draw_text();
  874. X              break;
  875. X      case LASO:
  876. X            print_msg("Hold down the LEFT mouse button and encircle a object.");
  877. X--- 189,221 ----
  878. X  Event           *event;
  879. X  {
  880. X    hide_msg();
  881. X+                
  882. X+ 
  883. X+   /*
  884. X+    * if we were just in paint mode and we change reset the events for
  885. X+    * the canvas and get rid of LOC_TRAJ
  886. X+    */
  887. X+   if (!paint_first)
  888. X+   {
  889. X+     window_set(canvas,WIN_CONSUME_PICK_EVENTS,
  890. X+     WIN_NO_EVENTS,
  891. X+     WIN_MOUSE_BUTTONS,
  892. X+     LOC_DRAG,
  893. X+     LOC_MOVE, 
  894. X+     0,0);
  895. X+         paint_first = TRUE;
  896. X+   }
  897. X+ 
  898. X    if ((int)panel_get_value(command_choice) != GET_PT)
  899. X      {
  900. X        (void)window_set(region_panel, WIN_SHOW, FALSE, 0);
  901. X!       panel_set(region_choice,PANEL_VALUE,PASTE,0);
  902. X      }
  903. X    (void)window_set(brush_panel, WIN_SHOW, FALSE, 0);
  904. X      switch((int)panel_get_value(command_choice)) {
  905. X      case TEXT:
  906. X!           print_msg("Hold down the RIGHT mouse button and drag text to proper place.");
  907. X!           mouse_parms();
  908. X              break;
  909. X      case LASO:
  910. X            print_msg("Hold down the LEFT mouse button and encircle a object.");
  911. X***************
  912. X*** 128,133 ****
  913. X--- 239,245 ----
  914. X              break;
  915. X      case FFILL:
  916. X            fill_mode(item, event);
  917. X+             panel_set(command_choice,PANEL_VALUE, GET_PT,0);
  918. X            mouse_parms();
  919. X              break;
  920. X      case OVAL:
  921. X***************
  922. X*** 159,164 ****
  923. X--- 271,277 ----
  924. X                    bottom_x = image_wid;
  925. X                bottom_y = image_hgt;
  926. X                select_region(pw,top_x,top_y,bottom_x,bottom_y);
  927. X+               print_msg("Entire drawing area is now selected.");
  928. X              }
  929. X            else
  930. X              {
  931. X***************
  932. X*** 175,184 ****
  933. X            if ((mouse_left == ERASE) &&  (confirm("Erase entire drawing area ?")))
  934. X              {
  935. X              clear_screen();
  936. X-             (void)window_set(canvas,
  937. X-                   CANVAS_WIDTH,        DEFAULT_IMAGE_WID,
  938. X-                   CANVAS_HEIGHT,    DEFAULT_IMAGE_HGT,
  939. X-                 0);
  940. X              }
  941. X            else
  942. X                      if (top_x || top_y || bottom_x || bottom_y)
  943. X--- 288,293 ----
  944. X***************
  945. X*** 218,223 ****
  946. X--- 327,333 ----
  947. X  Panel_item      item;
  948. X  Event           *event;
  949. X  {
  950. X+ 
  951. X    if (undo_flag)
  952. X    {
  953. X      clean_region();
  954. X***************
  955. X*** 224,235 ****
  956. X      clean_point();
  957. X      clean_poly();
  958. X      fat_done();
  959. X!     pw_write(pw,0,0, image_wid,image_hgt, PIX_SRC, undo_pr,0,0);
  960. X    }
  961. X  }     
  962. X  
  963. X  
  964. X  
  965. X  /*
  966. X   * clear the drawing area
  967. X   */
  968. X--- 334,387 ----
  969. X      clean_point();
  970. X      clean_poly();
  971. X      fat_done();
  972. X!     pw_batch_on(pw);
  973. X!     pr_swap(pw,undo_pr);
  974. X!     pw_batch_off(pw);
  975. X    }
  976. X  }     
  977. X  
  978. X  
  979. X+ /*
  980. X+  * this funxtion was written by rainbow@sbcs.sunsb.edu (Hong Min)
  981. X+  *
  982. X+  * this function will swap the pixrect "pr2" with the pixwin "pw" by
  983. X+  * coping 25 lines at a time. This is needed so that full size color
  984. X+  * pixwins (1 meg of memory) can be exchanged with out the need of
  985. X+  * a third buffer
  986. X+  */
  987. X+ pr_swap(pw, pr2)
  988. X+     Pixwin         *pw;
  989. X+     struct pixrect     *pr2;
  990. X+ {
  991. X+     struct pixrect        *buf;
  992. X+     int     i, start, loop, rem, width, height, buf_size;
  993. X  
  994. X+     width = pr2->pr_size.x;
  995. X+     height = pr2->pr_size.y;
  996. X+     buf_size = 25;
  997. X+ 
  998. X+     buf = mem_create(width, buf_size, image_depth);
  999. X+ 
  1000. X+     loop = height / buf_size;
  1001. X+     rem = height % buf_size;
  1002. X+     
  1003. X+     for(i=0; i<loop; i++)
  1004. X+     {
  1005. X+        pr_rop(buf, 0, 0, width, buf_size, PIX_SRC, pw->pw_prretained, 0, i*buf_size);
  1006. X+        pw_rop(pw, 0, i*buf_size, width, buf_size, PIX_SRC, pr2, 0, i*buf_size);
  1007. X+        pr_rop(pr2, 0, i*buf_size, width, buf_size, PIX_SRC, buf, 0, 0);
  1008. X+     }
  1009. X+ 
  1010. X+     if (rem != 0)
  1011. X+     {
  1012. X+        start = (loop-1)*buf_size;
  1013. X+        pr_rop(buf, 0, 0, width, rem, PIX_SRC, pw->pw_prretained, 0, start);
  1014. X+        pw_rop(pw, 0, start, width, rem, PIX_SRC, pr2, 0, start);
  1015. X+        pr_rop(pr2, 0, start, width, rem, PIX_SRC, buf, 0, 0);
  1016. X+     }
  1017. X+ }
  1018. X+ 
  1019. X+ 
  1020. X  /*
  1021. X   * clear the drawing area
  1022. X   */
  1023. X***************
  1024. X*** 308,314 ****
  1025. X--- 460,468 ----
  1026. X  caddr_t arg;
  1027. X  {
  1028. X      Pixwin      *pw     = canvas_pixwin(canvas_local);
  1029. X+     int ROP;
  1030. X  
  1031. X+ 
  1032. X      if (grid_size)
  1033. X       {
  1034. X      event_set_x(event,event_x(event) + grid_size/2 - (event_x(event)%grid_size));
  1035. X***************
  1036. X*** 319,352 ****
  1037. X      {
  1038. X          if (event_id(event) == MS_LEFT)
  1039. X          {
  1040. X!         if ((mouse_left == RECT_H) || (mouse_left == RECT_F))
  1041. X!            draw_rectangle(start_x,start_y,event_x(event), event_y(event));
  1042. X!         if (mouse_left == LINE)
  1043. X!            draw_line(start_x,start_y,event_x(event), event_y(event),PIX_SRC,cur_color);
  1044. X!         if (mouse_left == ERASE)
  1045. X!              {
  1046. X                     select_region(pw,top_x,top_y,top_x+PATTERN_SIZE,top_y+PATTERN_SIZE);
  1047. X                 reset_region();
  1048. X!              }
  1049. X  
  1050. X!         if (mouse_left == CIRCLE)
  1051. X!                      {
  1052. X!                  draw_line(start_x,start_y,old_x,old_y,PIX_XOR,1);
  1053. X!                 draw_circle(pw,start_x,start_y,distance(old_x,old_y,start_x,start_y),1,PIX_SET);
  1054. X!              }
  1055. X  
  1056. X!         if (mouse_left == OVAL)
  1057. X!            draw_oval(pw,start_x,start_y,old_x,old_y,TRUE);
  1058. X  
  1059. X!                 if (fat_source_x != -1)
  1060. X!                    fat_update(0,0);
  1061. X!         if (mouse_left == GET_PT)
  1062. X!          {
  1063. X               select_pt_x = event_x(event);
  1064. X             select_pt_y = event_y(event);
  1065. X!          }
  1066. X!         if (mouse_left == LASO)
  1067. X!         {
  1068. X             laso_cut_paste();
  1069. X             panel_set(region_choice,PANEL_VALUE,MOVE,0);
  1070. X             panel_set(command_choice,PANEL_VALUE,SEL_REG,0);
  1071. X--- 473,517 ----
  1072. X      {
  1073. X          if (event_id(event) == MS_LEFT)
  1074. X          {
  1075. X!         switch(mouse_left) {
  1076. X!         case RECT_H :
  1077. X!         case RECT_F :
  1078. X!            draw_rectangle(start_x,start_y,event_x(event), event_y(event),ROP);
  1079. X!            break;
  1080. X! 
  1081. X!         case LINE :
  1082. X!            if (!(ROP = get_current_ROP()))
  1083. X!             ROP = PIX_SRC | PIX_DST;
  1084. X!            if (ROP != (PIX_XOR))
  1085. X!                 draw_line(start_x,start_y,event_x(event), event_y(event),ROP,cur_color);
  1086. X!            break;
  1087. X! 
  1088. X!         case ERASE :
  1089. X                     select_region(pw,top_x,top_y,top_x+PATTERN_SIZE,top_y+PATTERN_SIZE);
  1090. X                 reset_region();
  1091. X!            break;
  1092. X  
  1093. X!         case CIRCLE :
  1094. X!            if (!(ROP = get_current_ROP()))
  1095. X!             ROP = PIX_SRC;
  1096. X!             draw_line(start_x,start_y,old_x,old_y,PIX_XOR,1);
  1097. X!            draw_circle(pw,start_x,start_y,distance(old_x,old_y,start_x,start_y),ROP);
  1098. X!            break;
  1099. X  
  1100. X!         case OVAL :
  1101. X!            if (!(ROP = get_current_ROP()))
  1102. X!             ROP = PIX_SRC;
  1103. X!            if (ROP == (PIX_XOR))
  1104. X!                 draw_oval(pw,start_x,start_y,old_x,old_y,ROP,FALSE);
  1105. X!            draw_oval(pw,start_x,start_y,old_x,old_y,ROP,TRUE);
  1106. X!            break;
  1107. X  
  1108. X!         case GET_PT :
  1109. X               select_pt_x = event_x(event);
  1110. X             select_pt_y = event_y(event);
  1111. X!            break;
  1112. X! 
  1113. X!         case LASO :
  1114. X             laso_cut_paste();
  1115. X             panel_set(region_choice,PANEL_VALUE,MOVE,0);
  1116. X             panel_set(command_choice,PANEL_VALUE,SEL_REG,0);
  1117. X***************
  1118. X*** 354,365 ****
  1119. X--- 519,543 ----
  1120. X                 (void)window_set(region_panel, WIN_SHOW,TRUE, 0);
  1121. X             print_msg("Object copied to Cut/Paste buffer. Hold down the RIGHT mouse button to drag the object.");
  1122. X             mouse_parms();
  1123. X+            break;
  1124. X          }
  1125. X+                 if (fat_source_x != -1)
  1126. X+                    fat_update(0,0);
  1127. X            }
  1128. X          if (event_id(event) == MS_RIGHT)
  1129. X          {
  1130. X+           if (mouse_left == TEXT)
  1131. X+             {
  1132. X+              if (!(ROP = get_current_ROP()))
  1133. X+             ROP = PIX_SRC;
  1134. X+              if (ROP != (PIX_XOR))
  1135. X+                 draw_text(event_x(event), event_y(event),ROP);
  1136. X+             }
  1137. X+           else
  1138. X                    if (((int)panel_get_value(region_choice) == MOVE) && (cut_buffer_pr != NULL))
  1139. X              {
  1140. X+                  if (!(ROP = get_current_ROP()))
  1141. X+                 ROP = PIX_SRC | PIX_DST;
  1142. X                   pw_write(pw,old_x- cut_buffer_pr->pr_size.x/2,
  1143. X                       old_y- cut_buffer_pr->pr_size.y/2,
  1144. X                       cut_buffer_pr->pr_size.x,
  1145. X***************
  1146. X*** 369,375 ****
  1147. X                     event_y(event)-cut_buffer_pr->pr_size.y/2,
  1148. X                   cut_buffer_pr->pr_size.x,
  1149. X                   cut_buffer_pr->pr_size.y,
  1150. X!                  PIX_SRC | PIX_DST, cut_buffer_pr,0,0);
  1151. X              }
  1152. X          }
  1153. X           return;
  1154. X--- 547,553 ----
  1155. X                     event_y(event)-cut_buffer_pr->pr_size.y/2,
  1156. X                   cut_buffer_pr->pr_size.x,
  1157. X                   cut_buffer_pr->pr_size.y,
  1158. X!                  ROP, cut_buffer_pr,0,0);
  1159. X              }
  1160. X          }
  1161. X           return;
  1162. X***************
  1163. X*** 380,387 ****
  1164. X              save_screen();
  1165. X          old_x = event_x(event);
  1166. X          old_y = event_y(event);
  1167. X!         start_x = event_x(event);
  1168. X!         start_y = event_y(event);
  1169. X          switch(mouse_left) {
  1170. X  
  1171. X          case LINE:
  1172. X--- 558,565 ----
  1173. X              save_screen();
  1174. X          old_x = event_x(event);
  1175. X          old_y = event_y(event);
  1176. X!         start_x = old_x;
  1177. X!         start_y = old_y;
  1178. X          switch(mouse_left) {
  1179. X  
  1180. X          case LINE:
  1181. X***************
  1182. X*** 398,403 ****
  1183. X--- 576,592 ----
  1184. X                 draw_point(pw,event_x(event), event_y(event));
  1185. X                 break;
  1186. X          case PAINT:
  1187. X+                if (paint_first)
  1188. X+                {
  1189. X+                  window_set(canvas,WIN_CONSUME_PICK_EVENTS,
  1190. X+                     WIN_NO_EVENTS,
  1191. X+                     WIN_MOUSE_BUTTONS,
  1192. X+                     LOC_DRAG,
  1193. X+                     LOC_MOVE, 
  1194. X+                     LOC_TRAJECTORY,
  1195. X+                     0,0);
  1196. X+                      paint_first = FALSE;
  1197. X+                }
  1198. X                 draw_brush(pw, event_x(event), event_y(event));
  1199. X                 break;
  1200. X          case ERASE:
  1201. X***************
  1202. X*** 409,415 ****
  1203. X                      draw_line(start_x,start_y,old_x,old_y,PIX_XOR,1);
  1204. X                 break;
  1205. X          case OVAL:
  1206. X!                    draw_oval(pw,start_x,start_y,old_x,old_y,FALSE);
  1207. X                 break;
  1208. X          case GET_PT:
  1209. X                      if (select_pt_x != -1)
  1210. X--- 598,604 ----
  1211. X                      draw_line(start_x,start_y,old_x,old_y,PIX_XOR,1);
  1212. X                 break;
  1213. X          case OVAL:
  1214. X!                    draw_oval(pw,start_x,start_y,old_x,old_y,PIX_XOR,FALSE);
  1215. X                 break;
  1216. X          case GET_PT:
  1217. X                      if (select_pt_x != -1)
  1218. X***************
  1219. X*** 452,457 ****
  1220. X--- 641,657 ----
  1221. X          }      
  1222. X          break;
  1223. X            case MS_RIGHT:
  1224. X+         if (mouse_left== TEXT)
  1225. X+             {
  1226. X+                save_screen();
  1227. X+                  old_x = event_x(event);
  1228. X+                old_y = event_y(event);
  1229. X+                if ((char*)panel_get_value(text_panel)[0] == 0)
  1230. X+                    ERROR("The current TEXT STRING is empty.");
  1231. X+                draw_text(old_x,old_y,PIX_XOR);
  1232. X+             }
  1233. X+         else
  1234. X+ 
  1235. X          if (((mouse_left==POLY_F) || (mouse_left ==POLY_H))
  1236. X             && (poly_points[0].x != -1))
  1237. X           {
  1238. X***************
  1239. X*** 488,504 ****
  1240. X--- 688,708 ----
  1241. X              erase_brush(pw, event_x(event), event_y(event));
  1242. X              break;
  1243. X          case LINE:
  1244. X+                pw_batch_on(pw);
  1245. X                 draw_line(old_x,old_y,start_x,start_y,PIX_XOR,1);
  1246. X                   old_x = event_x(event);
  1247. X                 old_y = event_y(event);
  1248. X                 draw_line(old_x,old_y,start_x,start_y,PIX_XOR,1);
  1249. X+                pw_batch_off(pw);
  1250. X              break;
  1251. X          case RECT_F :
  1252. X          case RECT_H :
  1253. X+                pw_batch_on(pw);
  1254. X                 select_region(pw,old_x,old_y,start_x,start_y);
  1255. X                   old_x = event_x(event);
  1256. X                 old_y = event_y(event);
  1257. X                 select_region(pw,old_x,old_y,start_x,start_y);
  1258. X+                pw_batch_off(pw);
  1259. X              break;
  1260. X          case CIRCLE:
  1261. X                 draw_line(old_x,old_y,start_x,start_y,PIX_XOR,1);
  1262. X***************
  1263. X*** 507,516 ****
  1264. X                 draw_line(old_x,old_y,start_x,start_y,PIX_XOR,1);
  1265. X              break;
  1266. X          case OVAL:
  1267. X!                draw_oval(pw,start_x,start_y,old_x,old_y,FALSE);
  1268. X                   old_x = event_x(event);
  1269. X                 old_y = event_y(event);
  1270. X!                draw_oval(pw,start_x,start_y,old_x,old_y,FALSE);
  1271. X              break;
  1272. X          case GET_PT:
  1273. X                 select_point(old_x,old_y);
  1274. X--- 711,722 ----
  1275. X                 draw_line(old_x,old_y,start_x,start_y,PIX_XOR,1);
  1276. X              break;
  1277. X          case OVAL:
  1278. X!                pw_batch_on(pw);
  1279. X!                draw_oval(pw,start_x,start_y,old_x,old_y,PIX_XOR,FALSE);
  1280. X                   old_x = event_x(event);
  1281. X                 old_y = event_y(event);
  1282. X!                draw_oval(pw,start_x,start_y,old_x,old_y,PIX_XOR,FALSE);
  1283. X!                pw_batch_off(pw);
  1284. X              break;
  1285. X          case GET_PT:
  1286. X                 select_point(old_x,old_y);
  1287. X***************
  1288. X*** 521,530 ****
  1289. X--- 727,738 ----
  1290. X                 select_point(old_x,old_y);
  1291. X              break;
  1292. X          case SEL_REG:
  1293. X+               pw_batch_on(pw);
  1294. X                select_region(pw,top_x,top_y,bottom_x,bottom_y);
  1295. X                      bottom_x = event_x(event);
  1296. X                bottom_y = event_y(event);
  1297. X                 select_region(pw,top_x,top_y,bottom_x,bottom_y);
  1298. X+               pw_batch_off(pw);
  1299. X              break;
  1300. X          case LASO:
  1301. X                 laso_addpt(ptlist,event_x(event),event_y(event));
  1302. X***************
  1303. X*** 541,546 ****
  1304. X--- 749,764 ----
  1305. X            }
  1306. X              if (window_get(canvas_local, WIN_EVENT_STATE, MS_RIGHT))
  1307. X          {
  1308. X+         if (mouse_left == TEXT)
  1309. X+              {
  1310. X+                pw_batch_on(pw);
  1311. X+                draw_text(old_x,old_y,PIX_XOR);
  1312. X+                  old_x = event_x(event);
  1313. X+                old_y = event_y(event);
  1314. X+                draw_text(old_x,old_y,PIX_XOR);
  1315. X+                pw_batch_off(pw);
  1316. X+              }
  1317. X+         else
  1318. X                  if ((int)panel_get_value(region_choice) == MOVE)
  1319. X              {
  1320. X                move_region(old_x,old_y,event_x(event),event_y(event));
  1321. X***************
  1322. X*** 597,631 ****
  1323. X   */
  1324. X  main(argc,argv) int argc; char *argv[];
  1325. X  {
  1326. X  char *s;
  1327. X  
  1328. X  /*
  1329. X!  * do some agr checking
  1330. X   */
  1331. X!      while (--argc > 0 && (*++argv)[0] == '-')
  1332. X!     for (s = argv[0]+1;*s != '\0';s++)
  1333. X!                 switch (*s) {
  1334. X!           case 'n':
  1335. X!                 undo_flag = FALSE;
  1336. X!                 break;
  1337. X!           case 'p':
  1338. X!                 image_hgt = DEFAULT_IMAGE_WID;
  1339. X!                 image_wid = DEFAULT_IMAGE_HGT;
  1340. X!                 break;
  1341. X!           case 'y': ++argv; argc--;
  1342. X!                 image_hgt = atoi(argv[0]);
  1343. X!                 break;
  1344. X!           case 'x': ++argv; argc--;
  1345. X!                    image_wid = atoi(argv[0]);
  1346. X!                   break;
  1347. X!           default:  printf("Usage: touchup [-x width] [-y height] [-n] [-p]\n");
  1348. X!                 exit(0);
  1349. X!         }
  1350. X!   if (argc > 0)
  1351. X!     {
  1352. X!       printf("Usage: touchup [-x width] [-y height] [-n] [-p]\n");
  1353. X!       exit(0);
  1354. X!     }
  1355. X  
  1356. X    clean_poly();
  1357. X  
  1358. X--- 815,854 ----
  1359. X   */
  1360. X  main(argc,argv) int argc; char *argv[];
  1361. X  {
  1362. X+ int targc;
  1363. X+ char **targv;
  1364. X  char *s;
  1365. X+ char temp_str[10];
  1366. X+ extern colormap_t colormap;
  1367. X  
  1368. X  /*
  1369. X!  * get the options
  1370. X   */
  1371. X!         targc = argc; targv = argv;
  1372. X!         while (--argc > 0 && (*++argv)[0] == '-')
  1373. X!                 for (s = argv[0]+1;*s != '\0';s++)
  1374. X!           switch (*s) {
  1375. X!                   case 'n':
  1376. X!                             undo_flag = FALSE;
  1377. X!                             break;
  1378. X!                   case 'p':
  1379. X!                             image_hgt = DEFAULT_IMAGE_WID;
  1380. X!                             image_wid = DEFAULT_IMAGE_HGT;
  1381. X!                             break;
  1382. X!                   case 'y':
  1383. X!                                 ++argv; argc--;
  1384. X!                             image_hgt = atoi(argv[0]);
  1385. X!                             break;
  1386. X!                   case 'x':
  1387. X!                                 ++argv; argc--;
  1388. X!                             image_wid = atoi(argv[0]);
  1389. X!                             break;
  1390. X!                   default:
  1391. X!                             break;
  1392. X!       }
  1393. X! /*
  1394. X!  * leftovers are potential window option arguments
  1395. X!  */
  1396. X  
  1397. X    clean_poly();
  1398. X  
  1399. X***************
  1400. X*** 642,667 ****
  1401. X    init_font();
  1402. X    getcwd(file_name,MAX_FILE_NAME-2);
  1403. X    strcat(file_name,"/");
  1404. X!   init_windows(argc,argv);
  1405. X    /*
  1406. X     * are we on a color machine ????
  1407. X     */
  1408. X    image_depth = pw->pw_pixrect->pr_depth;
  1409. X!   if (image_depth == 8)
  1410. X      {
  1411. X      init_colortable();
  1412. X      my_put_colormap();
  1413. X      set_color();
  1414. X      }
  1415. X    else
  1416. X      set_mono();
  1417. X  
  1418. X    if (undo_flag)
  1419. X       undo_pr = my_mem_create(image_wid,image_hgt,image_depth);
  1420. X    else
  1421. X       panel_set(undo_button,PANEL_SHOW_ITEM, FALSE,0);
  1422. X  
  1423. X    init_mag();
  1424. X    window_main_loop(base_frame);
  1425. X  }
  1426. X  
  1427. X--- 865,929 ----
  1428. X    init_font();
  1429. X    getcwd(file_name,MAX_FILE_NAME-2);
  1430. X    strcat(file_name,"/");
  1431. X!   init_windows(&targc,targv);
  1432. X! 
  1433. X! /*
  1434. X!  * some sanity check for option arguments
  1435. X!  */
  1436. X!         while (--targc > 0 && (*++targv)[0] == '-')
  1437. X!                 for (s = targv[0]+1;*s != '\0';s++)
  1438. X!           switch (*s) {
  1439. X!                   case 'n':
  1440. X!                   case 'p':
  1441. X!                             break;
  1442. X!                   case 'y':
  1443. X!                   case 'x':
  1444. X!                                 ++targv; targc--;
  1445. X!                             break;
  1446. X!                   default:
  1447. X!                         printf("Usage: touchup [-x width] [-y height] [-n] [-p]\n");
  1448. X!                                 exit(0);
  1449. X!                             break;
  1450. X!       }
  1451. X!   if (targc > 0)
  1452. X!     {
  1453. X!       printf("Usage: touchup [-x width] [-y height] [-n] [-p]\n");
  1454. X!       exit(0);
  1455. X!     }
  1456. X!                 
  1457. X!   sprintf(temp_str,"%d",image_hgt);
  1458. X!   panel_set(height_text,PANEL_VALUE,temp_str,0);
  1459. X!   sprintf(temp_str,"%d",image_wid);
  1460. X!   panel_set(width_text,PANEL_VALUE,temp_str,0);
  1461. X    /*
  1462. X     * are we on a color machine ????
  1463. X     */
  1464. X    image_depth = pw->pw_pixrect->pr_depth;
  1465. X!   if (image_depth > 1)
  1466. X      {
  1467. X      init_colortable();
  1468. X      my_put_colormap();
  1469. X      set_color();
  1470. X+     colormap.map[0] = red;
  1471. X+     colormap.map[1] = green;
  1472. X+     colormap.map[2] = blue;
  1473. X+     colormap.type = RMT_EQUAL_RGB;
  1474. X+     colormap.length = 256;
  1475. X      }
  1476. X    else
  1477. X      set_mono();
  1478. X  
  1479. X+   window_set(canvas, CANVAS_RETAINED, TRUE, 0);
  1480. X+ 
  1481. X    if (undo_flag)
  1482. X       undo_pr = my_mem_create(image_wid,image_hgt,image_depth);
  1483. X    else
  1484. X       panel_set(undo_button,PANEL_SHOW_ITEM, FALSE,0);
  1485. X  
  1486. X+   brush_temp_pr = my_mem_create(PATTERN_SIZE,PATTERN_SIZE,1);
  1487. X    init_mag();
  1488. X+   print_msg("Press the LEFT mouse button to PAINT.");
  1489. X+ 
  1490. X    window_main_loop(base_frame);
  1491. X  }
  1492. X  
  1493. X***************
  1494. X*** 775,778 ****
  1495. X--- 1037,1041 ----
  1496. X        printf("Not enough memory, memory allocation problems!!!\n");
  1497. X        exit(0);
  1498. X          }
  1499. X+     return(temp_pr);  /* this is line that was missing in version 2.2 */
  1500. X  }
  1501. Xdiff -c ./touchup.man ../../Ver2.3/source/touchup.man
  1502. X*** ./touchup.man    Mon Jun 13 23:52:05 1988
  1503. X--- ../../Ver2.3/source/touchup.man    Fri Jun 17 00:25:36 1988
  1504. X***************
  1505. X*** 1,4 ****
  1506. X! .TH Touchup 1 "26 March 1988"
  1507. X  .SH NAME
  1508. X  touchup \- a bitmap graphics editor for Sun raster files
  1509. X  .SH SYNOPSIS
  1510. X--- 1,4 ----
  1511. X! .TH TOUCHUP 1 "4 June 1988"
  1512. X  .SH NAME
  1513. X  touchup \- a bitmap graphics editor for Sun raster files
  1514. X  .SH SYNOPSIS
  1515. X***************
  1516. X*** 34,40 ****
  1517. X  will require less memory.  The use of this
  1518. X  option will make the color version much more
  1519. X  usable, by freeing up a large amount of the memory.
  1520. X- 
  1521. X  .SH COMMANDS
  1522. X  .LP
  1523. X  To edit a bitmap, type `\fBtouchup\fP'.  
  1524. X--- 34,39 ----
  1525. X***************
  1526. X*** 74,80 ****
  1527. X  .IP "\fBSave:standard format\fP" 10
  1528. X  When the save cycle is set to this mode the current image
  1529. X  will be saved out in the standard Sun raster file format.
  1530. X! .IP "\fBSave:compress\fP" 10
  1531. X  When the save cycle is set to this mode the current image 
  1532. X  will be saved out in the Sun raster file
  1533. X  BYTE_ENCODED format.  This will often compress the file to one half
  1534. X--- 73,79 ----
  1535. X  .IP "\fBSave:standard format\fP" 10
  1536. X  When the save cycle is set to this mode the current image
  1537. X  will be saved out in the standard Sun raster file format.
  1538. X! .IP "\fBSave:Byte_Encoded\fP" 10
  1539. X  When the save cycle is set to this mode the current image 
  1540. X  will be saved out in the Sun raster file
  1541. X  BYTE_ENCODED format.  This will often compress the file to one half
  1542. X***************
  1543. X*** 90,102 ****
  1544. X  When Grid is set to some value other that "none" every bitmap operation
  1545. X  will be forced to the closest grid point.  The number after Grid is the number of
  1546. X  pixels between each grid point.  The actual grid is not visible.
  1547. X  .IP "\fB(undo)\fP"
  1548. X! When this button pressed the last operation effecting the drawing area will be removed.
  1549. X  .IP "\fB(view)\fP"
  1550. X  When this button is pressed a window will be displayed containing
  1551. X  one of two possible images, depending on the "view" cycle.
  1552. X  .IP "\fBview:man page\fP"
  1553. X! This will set the view to the manual page entry for Touchup, so that when
  1554. X  the "view" button is pressed, a window containing the manual page
  1555. X  will be displayed.
  1556. X  .IP "\fBview:Cut/Paste\fP"
  1557. X--- 89,116 ----
  1558. X  When Grid is set to some value other that "none" every bitmap operation
  1559. X  will be forced to the closest grid point.  The number after Grid is the number of
  1560. X  pixels between each grid point.  The actual grid is not visible.
  1561. X+ .IP "\fBBitmap OP: default\fP"
  1562. X+ The BITMAP OP setting determines what boolean operation is to be performed
  1563. X+ between the drawing primitive and the destination bitmap. The possible
  1564. X+ boolean operations are default, which uses default settings for each
  1565. X+ command, XOR which does a exclusive-or (invert), AND which will do
  1566. X+ a AND between the bits in the drawing area and the ones you are drawing,
  1567. X+ OR which will just set bits in the drawing area but not rest any bits,
  1568. X+ and SRC, which will just copy the source drawing directly on to the
  1569. X+ drawing area.
  1570. X+ For example,
  1571. X+ if you wanted to place white text in to a black region of the drawing area.
  1572. X+ You would first set BITMAP OP to XOR (exlusive or) and do the normal
  1573. X+ commands to place text in the drawing area.
  1574. X  .IP "\fB(undo)\fP"
  1575. X! When this button pressed the last operation effecting the drawing area will be removed. If this button is pressed again, the last operation effecting the drawing area will be redisplayed.
  1576. X  .IP "\fB(view)\fP"
  1577. X  When this button is pressed a window will be displayed containing
  1578. X  one of two possible images, depending on the "view" cycle.
  1579. X  .IP "\fBview:man page\fP"
  1580. X! This will set the view to the manual page entry for
  1581. X! .IR Touchup ,
  1582. X! so that when
  1583. X  the "view" button is pressed, a window containing the manual page
  1584. X  will be displayed.
  1585. X  .IP "\fBview:Cut/Paste\fP"
  1586. X***************
  1587. X*** 104,112 ****
  1588. X  the "view" button is pressed, a window with current Cut/Paste buffer
  1589. X  will be displayed.
  1590. X  .IP "\fBview:Touchup info\fP"
  1591. X! This will set the view to the copyright notice for touchup, so that when
  1592. X  the "view" button is pressed, a window with the copyright notice
  1593. X  will appear.
  1594. X  .IP "\fBBorders:Yes\fP"
  1595. X  This cycle determines is borders are drawn on filled reactangles
  1596. X  and filled polygons.
  1597. X--- 118,138 ----
  1598. X  the "view" button is pressed, a window with current Cut/Paste buffer
  1599. X  will be displayed.
  1600. X  .IP "\fBview:Touchup info\fP"
  1601. X! This will set the view to the copyright notice for
  1602. X! .IR Touchup ,
  1603. X! so that when
  1604. X  the "view" button is pressed, a window with the copyright notice
  1605. X  will appear.
  1606. X+ .IP "\fB(resize)\fP"
  1607. X+ When this button is pressed the current value of the "height" and "width"
  1608. X+ fields will be used to resize the drawing area.  For example if you want to
  1609. X+ change the drawing area to a space of 512 by 512 pixels, you would simple
  1610. X+ select the "height" field and type in 512 and then select the "width" field
  1611. X+ and type 512 then press the "resize" button.
  1612. X+ .IP "\fBHeight: xxx\fP"
  1613. X+ This field displays the current height of the drawing area in pixels.
  1614. X+ .IP "\fBWidth: xxx\fP"
  1615. X+ This field displays the current width of the drawing area in pixels.
  1616. X  .IP "\fBBorders:Yes\fP"
  1617. X  This cycle determines is borders are drawn on filled reactangles
  1618. X  and filled polygons.
  1619. X***************
  1620. X*** 117,122 ****
  1621. X--- 143,157 ----
  1622. X  This is the string that is copied to the bitmap when the TEXT command is used.
  1623. X  .IP "\fBfonts:ABC\fP"
  1624. X  This cycle determines the font for the text when the TEXT command is used.
  1625. X+ .IP "\fBlasso clear:X\fP"
  1626. X+ If this option is turned on (it turned on by default),
  1627. X+ then when a region is selected
  1628. X+ with the LASSO it will first copy the region to the Cut/Paste
  1629. X+ buffer and then it will clear the selected region.  If you place the
  1630. X+ mouse on top of the box after "lasso clear" and press the LEFT mouse
  1631. X+ button you can toggle this
  1632. X+ option on and off.  When this option is turned off the region that
  1633. X+ selected by LASSO is not cleared.
  1634. X  .IP "\fBMessages\fP"
  1635. X  The bottom line of this window is a message subwindow, which displays
  1636. X  messages, prompts, and warnings.
  1637. X***************
  1638. X*** 140,149 ****
  1639. X  mouse button.
  1640. X  .IP "\fBTEXT\fP" 10
  1641. X  First move to the Text string field in the topmost window and type in the
  1642. X! text that you wish to place on the bitmap.  Then use the SELECT POINT mode
  1643. X! to select a point within the drawing area.  Once both of these two things are
  1644. X! done press the TEXT command icon with "ABC" on it, and the current
  1645. X! text string will be placed on to the bitmap in the currently selected font.
  1646. X  .IP "\fBMAGNIFY\fP" 10
  1647. X  First use the SELECT POINT mode to select a point within the drawing area that
  1648. X  you wish to look at in detail.  Then press the command icon for MAGNIFY
  1649. X--- 175,185 ----
  1650. X  mouse button.
  1651. X  .IP "\fBTEXT\fP" 10
  1652. X  First move to the Text string field in the topmost window and type in the
  1653. X! text that you wish to place on the bitmap.  Then press the TEXT command icon
  1654. X! with "ABC" on it, move the cursor to the drawing and hold down the
  1655. X! RIGHT mouse button. You can then drag the text to the desired location
  1656. X! on the drawing area, release the RIGHT button when you want to place a copy
  1657. X! of the text on to the bitmap.
  1658. X  .IP "\fBMAGNIFY\fP" 10
  1659. X  First use the SELECT POINT mode to select a point within the drawing area that
  1660. X  you wish to look at in detail.  Then press the command icon for MAGNIFY
  1661. X***************
  1662. X*** 227,233 ****
  1663. X  and then release the LEFT mouse button.
  1664. X  .IP "\fBOVAL\fP"
  1665. X  Like \fBCIRCLE\fP except draws a oval.
  1666. X- 
  1667. X  .IP "\fBPOLYGON\fP"
  1668. X  Once this command is selected, move to the drawing area and press the LEFT mouse
  1669. X  button when the cursor is at the first vertex of the polygon that
  1670. X--- 263,268 ----
  1671. X***************
  1672. X*** 257,267 ****
  1673. X  .IP "\fBCOPY\fP"
  1674. X  This command will place a copy of the currently selected region into the
  1675. X  Cut/Paste buffer.
  1676. X! .IP "\fBPASTE\fP"
  1677. X! First use the SELECT POINT command to select the upper right hand corner
  1678. X! of where you wish to place the Cut/Paste buffer.  Then press the PASTE
  1679. X! command icon and the contents of the current Cut/Paste buffer will be copied
  1680. X! to the drawing area.
  1681. X  .IP "\fBMOVE\fP"
  1682. X  First use either COPY, CUT, or Load:Cut/Paste buffer to put an image into
  1683. X  the current Cut/Paste buffer.  Once the MOVE command has been selected,
  1684. X--- 292,306 ----
  1685. X  .IP "\fBCOPY\fP"
  1686. X  This command will place a copy of the currently selected region into the
  1687. X  Cut/Paste buffer.
  1688. X! .IP "\fBSCALE\fP"
  1689. X! First use either COPY, CUT, or Load:Cut/Paste buffer to put an image into
  1690. X! the current Cut/Paste buffer.  Then press SELECT REGION so that you will
  1691. X! in the correct mode.  Now hold down the LEFT mouse button and select
  1692. X! the destination region for the Cut/Paste buffer.  If the size of the
  1693. X! destination region is different from the size of the original image
  1694. X! then the image will be SCALED to the fix into the destination area.
  1695. X! In this way the SCALE command can be used to enlarge, shrink, and stretch
  1696. X! images.
  1697. X  .IP "\fBMOVE\fP"
  1698. X  First use either COPY, CUT, or Load:Cut/Paste buffer to put an image into
  1699. X  the current Cut/Paste buffer.  Once the MOVE command has been selected,
  1700. X***************
  1701. X*** 269,278 ****
  1702. X--- 308,328 ----
  1703. X  As long as the RIGHT mouse button is held down, you can position the image
  1704. X  where you like.  Then let go of the RIGHT mouse button to place a copy of
  1705. X  the image on the drawing area.
  1706. X+ NOTE: If you are using the MOVE command with a color image you will
  1707. X+ probabilly want to set the "Bitmap OP" to "SRC" so that the colors are
  1708. X+ not messed up when the Cut/Paste buffer is copied onto the bitmap.
  1709. X  .IP "\fBCUT\fP"
  1710. X  This command will place a copy of the currently selected region into the
  1711. X  Cut/Paste buffer and then it will fill the selected region with the
  1712. X  currently selected pattern.
  1713. X+ .IP "\fBPASTE\fP"
  1714. X+ First use the SELECT POINT command to select the upper right hand corner
  1715. X+ of where you wish to place the Cut/Paste buffer.  Then press the PASTE
  1716. X+ command icon and the contents of the current Cut/Paste buffer will be copied
  1717. X+ to the drawing area.
  1718. X+ NOTE: If you are using the PASTE command with a color image you will
  1719. X+ probabilly want to set the "Bitmap OP" to "SRC" so that the colors are
  1720. X+ not messed up when the Cut/Paste buffer is copied onto the bitmap.
  1721. X  .IP "5)" 5
  1722. X  The last subwindow is the drawing area, which is in the center of the main
  1723. X  window.
  1724. X***************
  1725. X*** 282,304 ****
  1726. X  Save a image out to a file and use the following Unix command to
  1727. X  dump the image to a full page picture on an Apple Laser Writer or any
  1728. X  other PostScript laser printer, where
  1729. X! file_name is the file name of an image created in Touchup.
  1730. X! 
  1731. X  .LP
  1732. X  When the picture is wider than it is high use the following command:
  1733. X  
  1734. X!      % pssun -s 8 10.5 -r file_name | lpr -Plw
  1735. X! 
  1736. X! 
  1737. X  .LP
  1738. X  When the picture is higher than it is wide use this command:
  1739. X  
  1740. X!      % pssun -s 8 10.5 file_name | lpr -Plw
  1741. X! 
  1742. X  .LP
  1743. X  When the picture is part of a document use this command:
  1744. X  
  1745. X!           % pssun -S 6 -l 1.5 3 file_name | lpr -Plw
  1746. X  .LP
  1747. X  Images can also to sent to a IMPRESS laser printers with a command
  1748. X  similar to the following, where "/u5/sr/local/bin/imPf2" is the location
  1749. X--- 332,351 ----
  1750. X  Save a image out to a file and use the following Unix command to
  1751. X  dump the image to a full page picture on an Apple Laser Writer or any
  1752. X  other PostScript laser printer, where
  1753. X! file_name is the file name of an image created in
  1754. X! .IR Touchup .
  1755. X  .LP
  1756. X  When the picture is wider than it is high use the following command:
  1757. X  
  1758. X!      % pssun -s 8 10.5 -r file_name | lpr -Plw 
  1759. X  .LP
  1760. X  When the picture is higher than it is wide use this command:
  1761. X  
  1762. X!      % pssun -s 8 10.5 file_name | lpr -Plw 
  1763. X  .LP
  1764. X  When the picture is part of a document use this command:
  1765. X  
  1766. X!           % pssun -S 6 -l 1.5 3 file_name | lpr -Plw 
  1767. X  .LP
  1768. X  Images can also to sent to a IMPRESS laser printers with a command
  1769. X  similar to the following, where "/u5/sr/local/bin/imPf2" is the location
  1770. X***************
  1771. X*** 320,336 ****
  1772. X  
  1773. X  .IP "\fBHow do I merge two different pictures in to one picture ???\fP" 5
  1774. X  .LP
  1775. X! When booting up Touchup the default drawing area is 1152 x 900,
  1776. X  which is the full screen size of the Sun graphics screen.  When
  1777. X  you load a new picture
  1778. X  the drawing area is restricted to the size of the picture that you loaded.
  1779. X! What you need to do is start up Touchup and load the first picture
  1780. X  into the Cut/Paste buffer by changing the cycle next to the load
  1781. X  button from "Load: Entire image" to "Load: Cut/Paste buffer" and then
  1782. X  press the load button.  The file will then be in the cut/paste
  1783. X  buffer and you can PASTE it or MOVE it to where ever you like.
  1784. X  Then load the second picture into the Cut/Paste buffer and PASTE that
  1785. X! picture where ever you like.
  1786. X  
  1787. X  
  1788. X  .IP "\fBHow do I make part of a picture into an icon ???\fP" 5
  1789. X--- 367,387 ----
  1790. X  
  1791. X  .IP "\fBHow do I merge two different pictures in to one picture ???\fP" 5
  1792. X  .LP
  1793. X! When booting up
  1794. X! .IR Touchup ,
  1795. X! the default drawing area is 1152 x 900,
  1796. X  which is the full screen size of the Sun graphics screen.  When
  1797. X  you load a new picture
  1798. X  the drawing area is restricted to the size of the picture that you loaded.
  1799. X! What you need to do is start up
  1800. X! .I Touchup
  1801. X! and load the first picture
  1802. X  into the Cut/Paste buffer by changing the cycle next to the load
  1803. X  button from "Load: Entire image" to "Load: Cut/Paste buffer" and then
  1804. X  press the load button.  The file will then be in the cut/paste
  1805. X  buffer and you can PASTE it or MOVE it to where ever you like.
  1806. X  Then load the second picture into the Cut/Paste buffer and PASTE that
  1807. X! picture whereever you like.
  1808. X  
  1809. X  
  1810. X  .IP "\fBHow do I make part of a picture into an icon ???\fP" 5
  1811. X***************
  1812. X*** 338,347 ****
  1813. X  .LP
  1814. X  Use a program such as the "The Portable Bitmap Toolkit" by Jef
  1815. X  Poskanzer(jef@lbl-rtsg.arpa)
  1816. X! This can be ftped from zap.mit.edu, I also have a copy
  1817. X  rolled out on tape if you do not have access to zap.mit.edu.
  1818. X  
  1819. X  
  1820. X  .IP "\fBHow do I convert other image format to Sun rasterfile format ???\fP" 5
  1821. X  .IP "\fBHow do I convert Sun rasterfile format to other image formats ???\fP" 5
  1822. X  
  1823. X--- 389,414 ----
  1824. X  .LP
  1825. X  Use a program such as the "The Portable Bitmap Toolkit" by Jef
  1826. X  Poskanzer(jef@lbl-rtsg.arpa)
  1827. X! This can be
  1828. X! .IR ftp ed
  1829. X! from zap.mit.edu, I also have a copy
  1830. X  rolled out on tape if you do not have access to zap.mit.edu.
  1831. X  
  1832. X  
  1833. X+ .IP "\fBHow do I make my own paint or brush patterns ???\fP" 5
  1834. X+ 
  1835. X+ .LP
  1836. X+ First find a pattern that you want to change, they are in
  1837. X+ standard icon format files names 'patternXX.icon'.  Then load the pattern
  1838. X+ file into iconedit and make any modifications (NOTE: the paint patterns
  1839. X+ only use the upper lefthand quarter of the drawing space in iconedit).
  1840. X+ After you have changed the pattern file, just type 'touch pattern.c ;
  1841. X+ strip_icon32x32 ; make' to recompile
  1842. X+ .IR Touchup .
  1843. X+ You can do the same thing to change the brush patterns, the brushes
  1844. X+ are in the files 'brushX.icon'.
  1845. X+ 
  1846. X+ 
  1847. X  .IP "\fBHow do I convert other image format to Sun rasterfile format ???\fP" 5
  1848. X  .IP "\fBHow do I convert Sun rasterfile format to other image formats ???\fP" 5
  1849. X  
  1850. X***************
  1851. X*** 348,358 ****
  1852. X  .LP
  1853. X  Use a program such as the "The Portable Bitmap Toolkit" by Jef
  1854. X  Poskanzer(jef@lbl-rtsg.arpa)
  1855. X! This can be ftped from zap.mit.edu, I also have a copy
  1856. X  rolled out on tape if you do not have access to zap.mit.edu.
  1857. X  
  1858. X  
  1859. X! .IP "\fBWhat does SAVE COMPRESSED mean ???\fP" 5
  1860. X  
  1861. X  .LP
  1862. X  This means that the image will be saved out in the Sun rasterfile
  1863. X--- 415,427 ----
  1864. X  .LP
  1865. X  Use a program such as the "The Portable Bitmap Toolkit" by Jef
  1866. X  Poskanzer(jef@lbl-rtsg.arpa)
  1867. X! This can be
  1868. X! .IR ftp ed
  1869. X! from zap.mit.edu, I also have a copy
  1870. X  rolled out on tape if you do not have access to zap.mit.edu.
  1871. X  
  1872. X  
  1873. X! .IP "\fBWhat does SAVE Byte_Encoded mean ???\fP" 5
  1874. X  
  1875. X  .LP
  1876. X  This means that the image will be saved out in the Sun rasterfile
  1877. X***************
  1878. X*** 373,382 ****
  1879. X  .IR rasterfile (5)
  1880. X  .SH BUGS
  1881. X  .LP
  1882. X! Touchup has not been totally debugged for use with color images.
  1883. X  .LP
  1884. X  If you try to FLOOD FILL an area that has a VERY complex pattern and covers
  1885. X! a large area it is possible to over flow the stack and cause a core dump.
  1886. X  .SH Author
  1887. X   Ray Kreisel
  1888. X   Computer Science Department
  1889. X--- 442,452 ----
  1890. X  .IR rasterfile (5)
  1891. X  .SH BUGS
  1892. X  .LP
  1893. X! .I Touchup
  1894. X! has not been totally debugged for use with color images.
  1895. X  .LP
  1896. X  If you try to FLOOD FILL an area that has a VERY complex pattern and covers
  1897. X! a large area it is possible to overflow the stack and cause a core dump.
  1898. X  .SH Author
  1899. X   Ray Kreisel
  1900. X   Computer Science Department
  1901. X***************
  1902. X*** 383,390 ****
  1903. X--- 453,464 ----
  1904. X   SUNY at Stony Brook
  1905. X   Stony Brook NY 11794
  1906. X  .LP
  1907. X+  PLEASE send comments and bug reports to one of the following addresses:
  1908. X+ 
  1909. X   UUCP: {allegra, philabs, pyramid, research}!sbcs!rayk   
  1910. X   ARPA-Internet: rayk@sbcs.sunysb.edu
  1911. X   CSnet: rayk@suny-sb
  1912. X+  (If nobody is home at any of the above addresses try:
  1913. X+     S72QKRE@TOWSONVX.BITNET       )
  1914. X  .LP
  1915. X  "If I get home before daylight, I just might get some sleep tonight...."
  1916. END_OF_DIFFS.1
  1917. if test 57931 -ne `wc -c <DIFFS.1`; then
  1918.     echo shar: \"DIFFS.1\" unpacked with wrong size!
  1919. fi
  1920. # end of overwriting check
  1921. fi
  1922. if test -f README_UPDATE -a "${1}" != "-c" ; then 
  1923.   echo shar: Will not over-write existing file \"README_UPDATE\"
  1924. else
  1925. echo shar: Extracting \"README_UPDATE\" \(990 characters\)
  1926. sed "s/^X//" >README_UPDATE <<'END_OF_README_UPDATE'
  1927. X
  1928. X    These diff files will move touchup version 2.2 to version 2.3.
  1929. X    Unpack the two shar files into the "touchup" source directory.
  1930. X    Then do the followng:
  1931. X
  1932. X
  1933. X        % patch < DIFFS.1
  1934. X
  1935. X        % patch < DIFFS.2
  1936. X
  1937. X        % make install
  1938. X
  1939. X        % make
  1940. X
  1941. X
  1942. X    If during any of the patches a "hunk" fails, that section
  1943. X    of the diffs will have to be applyed by hand.
  1944. X
  1945. X    If for some reason you have problems appling the diff files
  1946. X    you can get the full sources for touchup version 2.3 from
  1947. X    me by e-mail (soon they should be in the sun-spots archives,
  1948. X    which you reach by an anonymous ftp to titan.rice.edu)
  1949. X
  1950. X
  1951. X                ray
  1952. X
  1953. X
  1954. X---------------------------------------------------------------------------
  1955. X Ray Kreisel   CS Dept., SUNY at Stony Brook, Stony Brook NY 11794
  1956. XUUCP: {allegra, philabs, pyramid, research}!sbcs!rayk   
  1957. XARPA-Internet: rayk@sbcs.sunysb.edu            CSnet: rayk@suny-sb
  1958. X "If I get home before daylight, I just might get some sleep tonight...."
  1959. X---------------------------------------------------------------------------
  1960. END_OF_README_UPDATE
  1961. if test 990 -ne `wc -c <README_UPDATE`; then
  1962.     echo shar: \"README_UPDATE\" unpacked with wrong size!
  1963. fi
  1964. # end of overwriting check
  1965. fi
  1966. echo shar: End of archive 1 \(of 2\).
  1967. cp /dev/null ark1isdone
  1968. MISSING=""
  1969. for I in 1 2 ; do
  1970.     if test ! -f ark${I}isdone ; then
  1971.     MISSING="${MISSING} ${I}"
  1972.     fi
  1973. done
  1974. if test "${MISSING}" = "" ; then
  1975.     echo You have unpacked both archives.
  1976.     rm -f ark[1-9]isdone
  1977. else
  1978.     echo You still need to unpack the following archives:
  1979.     echo "        " ${MISSING}
  1980. fi
  1981. ##  End of shell archive.
  1982. exit 0
  1983.  
  1984.